Skip to content

test: raise line coverage - #61

Merged
roxblnfk merged 2 commits into
1.xfrom
test/coverage-100
Nov 20, 2026
Merged

roxblnfk merged 2 commits into
1.xfrom
test/coverage-100

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • Feature: the deprecated protected RegistryModifier::isType() is called the way a subclass would, for datetime, integer, uuid and any other type, by column and by field type.
  • Feature: every add*Column() rejects an existing field of its type that is linked to another column.

Why?

Line coverage: Codecov 97.83% → 100% (the 9 missed lines were all in isType()). Locally with pcov on PHP 8.5, Unit + SQLite merged the way Codecov does: 444/453 → 453/453.

Checklist

  • Closes: no issue
  • Tested
    • Unit, Feature/SQLite and Regression/SQLite pass locally; the server suites run in CI only
    • Unit tests added
  • Documentation: not needed

Review notes

  • isType() has no caller in the package and RegistryModifier is @internal, but the class is not final and the method is protected, so a subclass written before v1.2 may still call it. The test reaches it through an anonymous subclass; if the method is meant to go, deleting it and the two tests is the alternative.
  • Infection: the integer branch of isType() returns what the final fallback would, so removing that return is an equivalent mutant; the column-name cases above kill four older escaped mutants and keep MSI over the 97% gate.

The method is protected and has no caller in the package, but subclasses written before v1.2 may still call it.

Assisted-By: Claude Opus 5.5 <[email protected]>
@roxblnfk
roxblnfk requested a review from a team November 20, 2026 20:32
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (277e925) to head (11737a4).
⚠️ Report is 1 commits behind head on 1.x.

Additional details and impacted files
@@             Coverage Diff             @@
##              1.x       #61      +/-   ##
===========================================
+ Coverage   97.83%   100.00%   +2.16%     
===========================================
  Files          20        20              
  Lines         416       416              
===========================================
+ Hits          407       416       +9     
+ Misses          9         0       -9     
Flag Coverage Δ
mysql 99.27% <ø> (+2.16%) ⬆️
postgres 99.27% <ø> (+2.16%) ⬆️
sqlite 99.27% <ø> (+2.16%) ⬆️
sqlserver 99.27% <ø> (+2.16%) ⬆️
unit 32.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The isType() tests add an equivalent mutant (the integer branch returns what the fallback would), which took MSI under the 97% gate; these cases kill four escaped validateColumnName() removals.

Assisted-By: Claude Opus 5.5 <[email protected]>
@roxblnfk
roxblnfk merged commit 303facd into 1.x Nov 20, 2026
22 checks passed
@roxblnfk
roxblnfk deleted the test/coverage-100 branch November 20, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant